package task1;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-06-04
 * Time:15:07
 */
public class TestDemo {
    public static void main(String[] args) {
       /* BinaryTree tree=new BinaryTree();
        tree.createTree();
        System.out.println(tree.size(tree.root));
        System.out.println(tree.leafSize(tree.root));
        System.out.println(tree.getKLevelSize(tree.root, 3));
        System.out.println(tree.getHeight(tree.root));
        tree.levelOrder(tree.root);
        try {
            System.out.println("该元素是"+tree.find(tree.root, 'C').val);
        }catch (NullPointerException e){
            e.printStackTrace();
            System.out.println("没有找到该元素");
        }*/
        List<TreeNode> list1=new ArrayList<>();
        List<TreeNode> list2=new ArrayList<>();
        BinaryTree tree=new BinaryTree();

        tree.createTree();
        TreeNode p=tree.root.left.left.left;
        TreeNode q=tree.root.right;
        tree.getPath(tree.root,p,list1);
        tree.getPath(tree.root,q,list2);
        System.out.println();
    }
}
